<?php echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN"
"http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title><?php echo App::Helper('Config')->siteInfo('site_title'); ?></title>
  </head>
  <body>
	<?php if($action=='cat'):?>
		<?php if(!empty($photos['data'])): ?>
			<?php if(!empty($photos['data'])):?>
				<?php foreach($photos['data'] as $photo):?>
				<p><a href="<?php echo $this->baseUrl("/wap/index/cat/{$id}");?>"><?php echo App::CategorySet('mobilegallerycat')->idToName($id); ?></a> &gt;&gt; <?php echo $photo['title'];?></p>
				<p>

					<a href="<?php echo $this->baseUrl("/uploads/filemanager/{$photo['image']}");  ?>">
					<img src="<?php echo $this->baseUrl("/uploads/filemanager/{$photo['image']}");  ?>" border="0" /></a> <br />
					<?php echo $photo['desc'];?></p>
				<?php endforeach;?>
				<?php if($photos['paging']!=""): ?><?php echo $photos['link']; ?><?php endif; ?>
			<?php else:?>
			<p>No Data Found</p>
		<?php endif;?>
			<p><a href="<?php echo $this->baseUrl('/wap');?>"><?php echo $this->__('Back to gallery Home');?></a>
		<?php endif;?>
	<?php else:?>
		<h1><?php echo App::Helper('Config')->siteInfo('site_title'); ?></h1>
		<?php if(!empty($categories['data'])):?>
		<?php foreach($categories['data'] as $category):?>
			<p>
				<?php if($category['image']!=""):?>
					<a href="<?php echo $this->baseUrl("/wap/index/cat/{$category['id']}")?>">
					<img src="<?php echo $this->baseUrl("/uploads/filemanager/{$category['image']}"); ?>" width="100" alt="" border="0" /></a><br />
				<?php endif;?>
				<a href="<?php echo $this->baseUrl("/wap/index/cat/{$category['id']}")?>"><?php echo $category['title']; ?></a>
			</p>
		<?php endforeach;?>
		<?php else:?>
			<p>No category found.</p>
		<?php endif;?>
	<?php endif;?>
  </body>
</html>
